@extends('app')

@section('content')
<ul class="nav nav-tabs">
    <li class="active"><a href="{{ url('/admin/bbs/banner')}}">banners列表</a></li>
    <li><a href="{{ url('/admin/bbs/banner/add?app=bbs') }}">banners添加</a></li>
</ul>


<div class="table-responsive mt20">
    <table class="table table-striped">
      <thead>
        <tr>
          <th>图片</th>
          <th>标题</th>
          <th>是否显示</th>
          <th>发布时间</th>
          <th>操作</th>
        </tr>
      </thead>
      <tbody>
      @foreach($result as $res)
        <tr id="banners_{{ $res->id }}">
          <td><img src="{{ $res->attachment->url }}" width="120" height="60"></td>
          <td><a href="{{ url('/admin/bbs/banner/details/'.$res->id) }}">{{ $res->title }} </a></td>
          <td>{{ ($res->display==1)  ? '否':'是' }}</td>
          <td>{{ $res->created_at}}</td>
          <td>
            <a href="{{ url('/admin/bbs/banner/details/'.$res->id) }}"><i class="glyphicon glyphicon-edit"></i></a>&nbsp;&nbsp;&nbsp;&nbsp;
            <a href="javascript:void(0);" onclick="del_news('{{$res->id}}','{{ csrf_token() }}')"><i class="glyphicon glyphicon-remove-sign"></i></a>
          </td>
        </tr>
      @endforeach
      </tbody>
    </table>
</div>
<div>{!! $result->render() !!} </div>
@endsection
